package com.caishi.lkx.user.mapper;

import com.caishi.lkx.user.model.AgentUserModel;
import com.zzw.common.entity.IBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
* @Param:
* @return
* @Author: huangpeng
* @Date: 2021/9/26 14:59
* @Description:
*/
public interface AgentUserMapper extends IBaseMapper<AgentUserModel, String> {

    long searchUserCount(@Param("param") Map<String, Object> param);
    List<AgentUserModel> searchUser(@Param("offset") Long offset, @Param("size") Long size, @Param("param") Map<String, Object> param,
                                    @Param("asc") List<String> asc,
                                    @Param("desc") List<String> desc);
    @Select("select sub.id,cau.bind_group_id from   cu_user_base as sub     inner join     cu_agent_user as cau on sub.id = cau.id where cau.deleted = 0 and sub.deleted = 0 and sub.user_type & 64 = 64 and sub.user_status!=1 and cau.parent_id is null")
    List<AgentUserModel> selectAgentIds();
//    Boolean syncAgentUserToDistribute();
}
